package oocl.com.filter.impl;

import oocl.com.filter.DataFilter;
import oocl.com.util.RegexUtil;

public class DataFilterImpl implements DataFilter {
	@Override
	public boolean dataFilter(String input) {
		if(input == null)
			return false;
		String[] buf = input.split(",");
		if(buf.length != 5)
			return false;
		for(String i:buf){
			if(i == null)
				return false;
		}
		String regex = "\\d{4}-\\d{2}-\\d{2}";
		if(!RegexUtil.checkData(regex, buf[3]))
			return false;
		
//		regex = "[true|false]";
//		if(!RegexUtil.checkData(regex, buf[2]))
//			return false;
		
		return true;
	}
}
